package fr.umlv.m2.android.quizz.database;


public class Score {
	/**
	 * The score tournament rank id for multiplayer part.
	 */
	public static final int TOURNAMENT_RANK_ID = 0;
	/**
	 * The score number of good answer for multiplayer part.
	 */
	public static final int GOOD_ANSWER_ID = 1;
	/**
	 * The score number of bad answer for multiplayer part.
	 */
	public static final int BAD_ANSWER_ID = 2;
	/**
	 * The score percentage of success id for multiplayer part.
	 */
	public static final int SUCCESS_PERCENTAGE_ID = 3;
	/**
	 * The score last game id for multiplayer part.
	 */
	public static final int LAST_GAME_ID = 4;
	
	/**
	 * The score id.
	 */
	private long id;
	/**
	 * The tournament rank of the score for multiplayer game.
	 */
	private int tournamentRank;
	/**
	 * The number of good answer of the score.
	 */
	private int goodAnswer;
	/**
	 * The number of bad answer of the score.
	 */
	private int badAnswer;
	/**
	 * The percentage of success of the score.
	 */
	private int successPercentage;
	/**
	 * The time to establish the score for single player game.
	 */
	private long time;
	
	/**
	 * The score user id.
	 */
	private long userId;
	/**
	 * The score level id.
	 */
	private long levelId;
	/**
	 * The score theme id.
	 */
	private long themeId;
	
	/**
	 * Create the score object.
	 */
	public Score() {}
	
	/**
	 * Create the score object.
	 * 
	 * @param goodAnswer the number of good answer of the score.
	 * @param badAnswer the number of bad answer of the score.
	 * @param successPercentage the percentage of success of the score.
	 * @param levelId the level id of the score.
	 * @param playerId the player id of the score.
	 * @param themeId the theme id of the score.
	 */
	public Score(int goodAnswer, int badAnswer, int successPercentage, long levelId, long userId, long themeId) {
		this.goodAnswer = goodAnswer;
		this.badAnswer = badAnswer;
		this.successPercentage = successPercentage;
		
		this.levelId = levelId;
		this.userId = userId;
		this.themeId = themeId;
		
		this.tournamentRank = -1;
		this.time = new Long(-1);
	}
	
	/**
	 * Sets score id.
	 * 
	 * @param id the score id.
	 */
	public void setId(long id) {
		this.id = id;
	}
	
	/**
	 * Gets score id.
	 * 
	 * @return the score id.
	 */
	public long getId() {
		return this.id;
	}
	
	/**
	 * Sets score tournament rank.
	 * 
	 * @param tournamentRank the score tournament rank.
	 */
	public void setTournamentRank(int tournamentRank) {
		this.tournamentRank = tournamentRank;
	}
	
	/**
	 * Gets score tournament rank.
	 * 
	 * @return the score tournament rank.
	 */
	public int getTournamentRank() {
		return this.tournamentRank;
	}
	
	/**
	 * Sets score good answer.
	 * 
	 * @param goodAnswer the score good answer.
	 */
	public void setGoodAnswer(int goodAnswer) {
		this.goodAnswer = goodAnswer;
	}
	
	/**
	 * Gets score good answer.
	 * 
	 * @return the score good answer.
	 */
	public int getGoodAnswer() {
		return this.goodAnswer;
	}
	
	/**
	 * Sets score bad answer.
	 * 
	 * @param badAnswer the score bad answer.
	 */
	public void setBadAnswer(int badAnswer) {
		this.badAnswer = badAnswer;
	}
	
	/**
	 * Gets score bad answer.
	 * 
	 * @return the score bad answer.
	 */
	public int getBadAnswer() {
		return this.badAnswer;
	}
	
	/**
	 * Sets score percentage of success.
	 * 
	 * @param successPercentage the score percentage of success.
	 */
	public void setSuccessPercentage(int successPercentage) {
		this.successPercentage = successPercentage;
	}
	
	/**
	 * Gets score percentage of success.
	 * 
	 * @return the score percentage of success.
	 */
	public int getSuccessPercentage() {
		return this.successPercentage;
	}
	
	/**
	 * Sets the score time.
	 * 
	 * @param time the score time.
	 */
	public void setTime(long time) {
		this.time = time;
	}
	
	/**
	 * Gets the score time.
	 * 
	 * @return the score time.
	 */
	public long getTime() {
		return this.time;
	}
	
	/**
	 * Sets the score level id.
	 * 
	 * @param id the score level id.
	 */
	public void setLevelId(long id) {
		this.levelId = id;
	}
	
	/**
	 * Gets the score level id.
	 * 
	 * @return the score level id.
	 */
	public long getLevelId() {
		return this.levelId;
	}
	
	/**
	 * Sets the score player id.
	 * 
	 * @param id the score player id.
	 */
	public void setUserId(long id) {
		this.userId = id;
	}
	
	/**
	 * Gets the score player id.
	 * 
	 * @return the score player id.
	 */
	public long getUserId() {
		return this.userId;
	}
	
	/**
	 * Sets the score theme id.
	 * 
	 * @param id the score theme id.
	 */
	public void setThemeId(long id) {
		this.themeId = id;
	}
	
	/**
	 * Gets the score theme id.
	 * 
	 * @return the score theme id.
	 */
	public long getThemeId() {
		return this.themeId;
	}
}
